function initUpload()
{
$('#fileupload').fileupload({
	maxFileSize: 50000000, add: function (e, data) {
        var that = this;
        $.getJSON('/upload', function (url) {
        	data.url = url;
            $.blueimpUI.fileupload.prototype
                .options.add.call(that, e, data);
        });
    }
});

$('#fileupload').fileupload(
        'option',
        'autoUpload',
        'auto');
}